import { Component } from '@angular/core';
import {AlertController, IonicPage, NavController, NavParams} from 'ionic-angular';

/**
 * Generated class for the FeeDetailPage page.
 *
 * See https://ionicframework.com/docs/components/#navigation for more info on
 * Ionic pages and navigation.
 */


@Component({
  selector: 'page-fee-detail',
  templateUrl: 'fee-detail.html',
})
export class FeeDetailPage {
  bxTypeList: any = [
    {
      name: '总经理',bool:true
    },
    {
      name: '副总经理',bool:false
    },
    {
      name: '部门经理',bool:false
    }];
  bxTypeLabel:any;
  constructor(public navCtrl: NavController, public navParams: NavParams,public alertCtrl: AlertController,) {
  }

  ionViewDidLoad() {
    console.log('ionViewDidLoad FeeDetailPage');
  }


  bxTypeHander() {
    let alert = this.alertCtrl.create();
    alert.setTitle('职务级别');

    this.bxTypeList.forEach((value)=>{
      console.log(value);
      alert.addInput({
        type: 'radio',
        label: value.name,
        value: value.name,
        checked: value.bool
      });
    })

    alert.addButton({
      text: '确定',
      handler: data => {
        this.bxTypeLabel = data;
      }
    });
    alert.present();

  }
}
